﻿<Window x:Class="SsTool.Workflow.Windows.CreateWorkflowMetadataWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:src="clr-namespace:SsTool.Controls"
        Title="CreateWorkflowMetadataWindow" Height="500" Width="600" WindowStartupLocation="CenterScreen">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="*"/>
            <RowDefinition Height="auto"/>
        </Grid.RowDefinitions>
        <TabControl Grid.Row="0">
            <TabItem Name="_ctlTabInfo" Header="流程信息">
                <StackPanel Grid.Row="0">
                    <Label Content="Caption:"/>
                    <TextBox Grid.Column="1" Text="{Binding Caption,Mode=TwoWay}" />

                    <Label Content="Entity:"/>
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="*"/>
                            <ColumnDefinition Width="auto"/>
                        </Grid.ColumnDefinitions>
                        <TextBox Grid.Column="0" Text="{Binding Path=Entity.Caption}" IsReadOnly="True" VerticalContentAlignment="Center"/>
                        <Button Grid.Column="1" Name="_ctlBtnBrowse" Click="_ctlBtnBrowse_Click" Margin="5,0,0,0">
                            <StackPanel Orientation="Horizontal" Margin="1">
                                <Image Source="../../Resources/folder-open.png" Margin="0,0,3,0"/>
                                <TextBlock Text="选择实体" VerticalAlignment="Center"/>
                            </StackPanel>
                        </Button>
                    </Grid>
                </StackPanel>
            </TabItem>
            <TabItem Header="视图">
                <Grid Grid.Column="1">
                    <Grid.RowDefinitions>
                        <RowDefinition Height="auto"/>
                        <RowDefinition Height="*"/>
                    </Grid.RowDefinitions>
                    <StackPanel Grid.Row="0" Orientation="Horizontal">
                        <Button Content="Create Activity" Name="_ctlBtnCreateActivity" Click="_ctlBtnCreateActivity_Click"/>
                        <Button Content="Create Event" Name="_ctlBtnCreateEvent" Click="_ctlBtnCreateEvent_Click"/>
                    </StackPanel>
                    <Grid Grid.Row="1">
                        <src:WorkflowDesignerPanel x:Name="_ctlWorkflowPanel">
                        </src:WorkflowDesignerPanel>
                    </Grid>
                </Grid>
            </TabItem>
        </TabControl>
        <StackPanel Grid.Row="1" Orientation="Horizontal" HorizontalAlignment="Center">
            <Button Name="_ctlBtnSubmit" Content="保存" Click="_ctlBtnSubmit_Click" Margin="5" />
            <Button Name="_ctlBtnCancel" Content="关闭" Margin="5"/>
        </StackPanel>
    </Grid>
</Window>
